#ifndef CHARACTER_H
#define CHARACTER_H

#include <QString>
#include <QObject>
#include <QMap>
#include <QPair>
#include <QList>

struct SubCareerInfo
{
    QString subCareerName;
    QString damageType;
    QString armorType;

    SubCareerInfo(const QString &name,const QString &damage,const QString &armor)
        : subCareerName(name),damageType(damage),armorType(armor)
    {

    }
};

class CharacterClass
{
public:
    CharacterClass();
    ~CharacterClass();
    QPair<QString,QString> whatsCareer(QString baseCareer);
    QString whatsArmorMastery(QString baseCareer);
    QList<QString> subCareerList();

private:
    // 几大基础职业
    const QString Knight = "鬼剑士";
    const QString Shooter = "神枪手";
    const QString Fighter = "格斗家";
    const QString Clergy = "圣职者";
    const QString Enchanter = "魔法师";
    const QString PhysicalDamage = "物理伤害";
    const QString MagicalDamage = "魔法伤害";
    const QString ClothArmor = "布甲";
    const QString LeatherArmor = "皮甲";
    const QString LightArmor = "轻甲";
    const QString HeavyArmor = "重甲";
    const QString PlateArmor = "板甲";
    // 子职业
    const QMap<QString, QList<SubCareerInfo>> CareerData = {
        { Knight, {
                       {"狂战士", PhysicalDamage, HeavyArmor},
                       {"剑魂", PhysicalDamage, LightArmor},
                       {"鬼泣", MagicalDamage, ClothArmor},
                       {"阿修罗", MagicalDamage, PlateArmor},
                       {"剑宗", PhysicalDamage, LightArmor},
                       {"剑魔", PhysicalDamage, HeavyArmor},
                       {"剑豪", PhysicalDamage, LeatherArmor},
                       {"暗殿骑士", MagicalDamage, PlateArmor}
                   }
        },
        { Shooter, {
                        {"枪炮师", PhysicalDamage, HeavyArmor},
                        {"弹药", PhysicalDamage, LeatherArmor},
                        {"机械", MagicalDamage, ClothArmor},
                        {"漫游", PhysicalDamage, LeatherArmor}
                    }
        },
        { Fighter, {
                        {"散打", PhysicalDamage, LightArmor},
                        {"气功", MagicalDamage, ClothArmor}
                    }
        },
        { Clergy, {
                       {"女圣骑士", MagicalDamage, PlateArmor},
                       {"巫女", MagicalDamage, ClothArmor},
                       {"诱魔者", MagicalDamage, HeavyArmor},
                       {"异端审判者", PhysicalDamage, HeavyArmor}
                   }
        },
        { Enchanter, {
                          {"元素", MagicalDamage, ClothArmor},
                          {"魔道", MagicalDamage, LeatherArmor}
                      }
        }
    };
};


#endif // CHARACTER_H
